import VueRouter from 'vue-router'


//引入tabbar组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import shoppingcarContainer from './components/tabbar/shoppingcarContainer.vue'
import searchContainer from './components/tabbar/SearchContainer.vue'
import memberContainer from './components/tabbar/MemberContainer.vue'
import NewsList from './components/NewsList/NewsList.vue'
import News from './components/NewsList/News.vue'
import PicShare from './components/picshare/PicShare.vue'
import pic from './components/picshare/pic.vue'
import goodslist from './components/goods/goodslist.vue'
import goodsdetails from './components/goods/goodsdetails.vue'
import goodsCom from './components/goods/goodsCom.vue'
import goodsIntro from './components/goods/goodsIntro.vue'

var router = new VueRouter({
    routes: [
        {path:'/',redirect:'/home'},
        { path: '/home', component: HomeContainer },
        { path: '/shoppingcar', component: shoppingcarContainer },
        { path: '/search', component: searchContainer },
        { path: '/member', component: memberContainer },
        { path: '/home/newslist', component: NewsList },
        { path: '/home/newslist/news', component: News },
        { path: '/home/picshare', component: PicShare },
        { path: '/home/picshare/pic', component: pic},
        { path: '/home/goods', component: goodslist},
        { path: '/home/goods/goodsdetails/:id', component: goodsdetails,name:'goodsDet'},
        { path: '/home/goods/goodscom/:id', component: goodsCom,name:'goodsCom'},
        { path: '/home/goods/goodsintro/:id', component: goodsIntro,name:'goodsintro'},
        

    ],
    linkActiveClass: 'mui-active'
})

export default router